package common;

import java.util.ArrayList;

public class WorkerObject {

	private Integer workerID;
	private String ip;
	private int port;
	private int price;
	private int load = 0;
	private long regTime;
    private ArrayList<JobObject> JobsList = new ArrayList<JobObject>();
    private String status = null;
	
/*	WorkerObject(String ip, int port, int price){
		this.ip = ip;
		this.port = port;
		this.price = price;
	}
	
	WorkerObject(String ip, int port, int price, int load){
		this.ip = ip;
		this.port = port;
		this.price = price;
		this.load = load;
	}
	
	WorkerObject(String ip, int port, int price, int load, long regTime){
		this.ip = ip;
		this.port = port;
		this.price = price;
		this.load = load;
		this.regTime = regTime;
	}

    WorkerObject(String ip, int port, int price, int load, long regTime, ArrayList<JobObject> JobsList){
		this.ip = ip;
		this.port = port;
		this.price = price;
		this.load = load;
		this.regTime = regTime;
        this.JobsList = JobsList;
	}*/
    
	public Integer getWorkerID() {
		return workerID;
	}

	public void setWorkerID(Integer workerID) {
		this.workerID = workerID;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public int getLoad() {
		return load;
	}

	public void setLoad(int load) {
		this.load = load;
	}

	public long getRegTime() {
		return regTime;
	}

	public void setRegTime(long regTime) {
		this.regTime = regTime;
	}

    public void addJobsList (JobObject job){
        this.JobsList.add(job);
    }

    public void removeJobsList(int index){
        this.JobsList.remove(index);
    }

    public JobObject getJobFromJobsList(int index){
        JobObject aJob = this.JobsList.get(index);
        return aJob;
    }

    public ArrayList<JobObject> getJobsList(){
        return JobsList;
    }

	public void setJobsList(ArrayList<JobObject> jobList) {
		this.JobsList = jobList;
		
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
}
